<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>现货大厅 - B2B电商平台</title>
  <!-- 引入Tailwind CSS -->
  <script src="https://cdn.tailwindcss.com"></script>
  <!-- 引入Font Awesome -->
  <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
  
  <!-- 配置Tailwind -->
  <script>
    tailwind.config = {
      theme: {
        extend: {
          colors: {
            primary: '#165DFF',
            secondary: '#0E2E8B',
            success: '#00B42A',
            warning: '#FF7D00',
            danger: '#F53F3F',
            neutral: {
              100: '#F5F7FA',
              200: '#E5E6EB',
              300: '#C9CDD4',
              400: '#86909C',
              500: '#4E5969',
              600: '#272E3B',
              700: '#1D2129',
            }
          },
          fontFamily: {
            inter: ['Inter', 'system-ui', 'sans-serif'],
          },
        },
      }
    }
  </script>
  
  <style type="text/tailwindcss">
    @layer utilities {
      .content-auto {
        content-visibility: auto;
      }
      .product-card {
        @apply bg-white rounded-xl shadow-sm overflow-hidden border border-neutral-200 transition-all duration-300 hover:shadow-md hover:-translate-y-1;
      }
      .filter-tag {
        @apply px-3 py-1 bg-white border border-neutral-200 rounded-full text-sm cursor-pointer hover:border-primary hover:text-primary transition-colors;
      }
      .filter-tag.active {
        @apply bg-primary/10 border-primary text-primary;
      }
      .btn-primary {
        @apply bg-primary text-white px-4 py-2 rounded-lg hover:bg-primary/90 transition-all;
      }
      .btn-outline {
        @apply border border-primary text-primary px-4 py-2 rounded-lg hover:bg-primary/5 transition-all;
      }
    }
  </style>
</head>

<body class="font-inter bg-neutral-100 text-neutral-700 min-h-screen">
  <div class="container mx-auto px-4 py-8">
    <!-- 页面标题 -->
    <div class="mb-8">
      <h1 class="text-[clamp(1.5rem,3vw,2.5rem)] font-bold text-neutral-700 mb-2">现货大厅</h1>
      <p class="text-neutral-500">展示全部可立即发货的商品，库存实时更新</p>
    </div>
    
    <!-- 筛选区域 -->
    <div class="bg-white rounded-xl shadow-sm p-6 mb-8">
      <!-- 搜索框 -->
      <div class="flex flex-col md:flex-row gap-4 mb-6">
        <div class="relative flex-1">
          <input type="text" placeholder="搜索现货商品名称、型号、品牌..." 
                 class="w-full pl-10 pr-4 py-3 border border-neutral-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary">
          <i class="fa fa-search absolute left-3 top-1/2 -translate-y-1/2 text-neutral-400"></i>
        </div>
        <div class="flex gap-3">
          <button class="btn-primary flex items-center">
            <i class="fa fa-search mr-2"></i> 搜索
          </button>
          <button class="btn-outline flex items-center">
            <i class="fa fa-sliders mr-2"></i> 高级筛选
          </button>
        </div>
      </div>
      
      <!-- 快速筛选标签 -->
      <div class="space-y-4">
        <!-- 分类筛选 -->
        <div>
          <h3 class="text-sm font-medium text-neutral-500 mb-3">商品分类</h3>
          <div class="flex flex-wrap gap-2">
            <span class="filter-tag active">全部分类</span>
            <span class="filter-tag">电气设备</span>
            <span class="filter-tag">仪器仪表</span>
            <span class="filter-tag">工业自动化</span>
            <span class="filter-tag">五金工具</span>
            <span class="filter-tag">安防设备</span>
            <span class="filter-tag">照明设备</span>
            <span class="filter-tag">气动液压</span>
            <span class="filter-tag">更多 <i class="fa fa-angle-right ml-1"></i></span>
          </div>
        </div>
        
        <!-- 品牌筛选 -->
        <div>
          <h3 class="text-sm font-medium text-neutral-500 mb-3">品牌</h3>
          <div class="flex flex-wrap gap-2">
            <span class="filter-tag active">全部品牌</span>
            <span class="filter-tag">西门子</span>
            <span class="filter-tag">施耐德</span>
            <span class="filter-tag">ABB</span>
            <span class="filter-tag">三菱</span>
            <span class="filter-tag">欧姆龙</span>
            <span class="filter-tag">正泰</span>
            <span class="filter-tag">德力西</span>
            <span class="filter-tag">更多 <i class="fa fa-angle-right ml-1"></i></span>
          </div>
        </div>
        
        <!-- 库存与配送筛选 -->
        <div class="flex flex-wrap gap-6">
          <div>
            <h3 class="text-sm font-medium text-neutral-500 mb-3">库存状态</h3>
            <div class="flex flex-wrap gap-2">
              <span class="filter-tag active">全部库存</span>
              <span class="filter-tag">库存充足</span>
              <span class="filter-tag">库存紧张</span>
            </div>
          </div>
          
          <div>
            <h3 class="text-sm font-medium text-neutral-500 mb-3">配送方式</h3>
            <div class="flex flex-wrap gap-2">
              <span class="filter-tag active">全部方式</span>
              <span class="filter-tag">次日达</span>
              <span class="filter-tag">2-3天达</span>
              <span class="filter-tag">4-7天达</span>
            </div>
          </div>
        </div>
      </div>
    </div>
    
    <!-- 排序与结果统计 -->
    <div class="flex flex-col sm:flex-row justify-between items-start sm:items-center mb-6 gap-4">
      <div class="text-neutral-500">
        <span class="font-medium text-neutral-700">2,548</span> 件现货商品
      </div>
      
      <div class="flex items-center gap-3">
        <span class="text-sm text-neutral-500">排序方式：</span>
        <select class="border border-neutral-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary">
          <option>推荐排序</option>
          <option>价格从低到高</option>
          <option>价格从高到低</option>
          <option>库存从多到少</option>
          <option>最新上架</option>
        </select>
      </div>
    </div>
    
    <!-- 商品列表 -->
    <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 mb-8">
      <!-- 商品1 -->
      <a href="product-detail.html" class="product-card block">
        <div class="relative">
          <img src="https://picsum.photos/400/300?random=1" alt="西门子PLC模块" class="w-full h-48 object-cover">
          <span class="absolute top-3 left-3 bg-success text-white text-xs px-2 py-1 rounded">次日达</span>
          <button class="absolute top-3 right-3 w-8 h-8 bg-white/80 backdrop-blur-sm rounded-full flex items-center justify-center text-neutral-600 hover:text-primary transition-colors">
            <i class="fa fa-heart-o"></i>
          </button>
        </div>
        
        <div class="p-4">
          <div class="flex items-center text-xs text-neutral-500 mb-2">
            <span class="bg-neutral-100 px-2 py-0.5 rounded mr-2">电气设备</span>
            <span>西门子</span>
          </div>
          
          <h3 class="font-medium mb-2 line-clamp-2 h-12">S7-1200系列PLC模块 1214C DC/DC/DC 紧凑型CPU</h3>
          
          <div class="flex items-center text-sm text-neutral-500 mb-3">
            <i class="fa fa-warehouse mr-1"></i>
            <span>上海仓 | 库存 <span class="font-medium text-success">126</span> 件</span>
          </div>
          
          <div class="flex items-center justify-between">
            <div>
              <p class="text-primary font-bold text-lg">¥1,580.00</p>
              <p class="text-xs text-neutral-500 line-through">¥1,750.00</p>
            </div>
            
            <button class="btn-primary text-sm px-3 py-1.5">
              <i class="fa fa-shopping-cart mr-1"></i> 加入购物车
            </button>
          </div>
        </div>
      </a>
      
      <!-- 商品2 -->
      <a href="product-detail.html" class="product-card block">
        <div class="relative">
          <img src="https://picsum.photos/400/300?random=2" alt="施耐德断路器" class="w-full h-48 object-cover">
          <span class="absolute top-3 left-3 bg-success text-white text-xs px-2 py-1 rounded">次日达</span>
          <button class="absolute top-3 right-3 w-8 h-8 bg-white/80 backdrop-blur-sm rounded-full flex items-center justify-center text-neutral-600 hover:text-primary transition-colors">
            <i class="fa fa-heart-o"></i>
          </button>
        </div>
        
        <div class="p-4">
          <div class="flex items-center text-xs text-neutral-500 mb-2">
            <span class="bg-neutral-100 px-2 py-0.5 rounded mr-2">电气设备</span>
            <span>施耐德</span>
          </div>
          
          <h3 class="font-medium mb-2 line-clamp-2 h-12">NSX系列塑壳断路器 100A 3P 固定式 施耐德电气</h3>
          
          <div class="flex items-center text-sm text-neutral-500 mb-3">
            <i class="fa fa-warehouse mr-1"></i>
            <span>广州仓 | 库存 <span class="font-medium text-success">89</span> 件</span>
          </div>
          
          <div class="flex items-center justify-between">
            <div>
              <p class="text-primary font-bold text-lg">¥860.00</p>
              <p class="text-xs text-neutral-500 line-through">¥950.00</p>
            </div>
            
            <button class="btn-primary text-sm px-3 py-1.5">
              <i class="fa fa-shopping-cart mr-1"></i> 加入购物车
            </button>
          </div>
        </div>
      </a>
      
      <!-- 商品3 -->
      <a href="product-detail.html" class="product-card block">
        <div class="relative">
          <img src="https://picsum.photos/400/300?random=3" alt="数字万用表" class="w-full h-48 object-cover">
          <span class="absolute top-3 left-3 bg-warning text-white text-xs px-2 py-1 rounded">2-3天达</span>
          <button class="absolute top-3 right-3 w-8 h-8 bg-white/80 backdrop-blur-sm rounded-full flex items-center justify-center text-neutral-600 hover:text-primary transition-colors">
            <i class="fa fa-heart-o"></i>
          </button>
        </div>
        
        <div class="p-4">
          <div class="flex items-center text-xs text-neutral-500 mb-2">
            <span class="bg-neutral-100 px-2 py-0.5 rounded mr-2">仪器仪表</span>
            <span>福禄克</span>
          </div>
          
          <h3 class="font-medium mb-2 line-clamp-2 h-12">Fluke 17B+ 数字万用表 高精度全自动电工万能表</h3>
          
          <div class="flex items-center text-sm text-neutral-500 mb-3">
            <i class="fa fa-warehouse mr-1"></i>
            <span>北京仓 | 库存 <span class="font-medium text-warning">15</span> 件</span>
          </div>
          
          <div class="flex items-center justify-between">
            <div>
              <p class="text-primary font-bold text-lg">¥699.00</p>
              <p class="text-xs text-neutral-500 line-through">¥799.00</p>
            </div>
            
            <button class="btn-primary text-sm px-3 py-1.5">
              <i class="fa fa-shopping-cart mr-1"></i> 加入购物车
            </button>
          </div>
        </div>
      </a>
      
      <!-- 商品4 -->
      <a href="product-detail.html" class="product-card block">
        <div class="relative">
          <img src="https://picsum.photos/400/300?random=4" alt="接近开关" class="w-full h-48 object-cover">
          <span class="absolute top-3 left-3 bg-warning text-white text-xs px-2 py-1 rounded">2-3天达</span>
          <button class="absolute top-3 right-3 w-8 h-8 bg-white/80 backdrop-blur-sm rounded-full flex items-center justify-center text-neutral-600 hover:text-primary transition-colors">
            <i class="fa fa-heart-o"></i>
          </button>
        </div>
        
        <div class="p-4">
          <div class="flex items-center text-xs text-neutral-500 mb-2">
            <span class="bg-neutral-100 px-2 py-0.5 rounded mr-2">工业自动化</span>
            <span>欧姆龙</span>
          </div>
          
          <h3 class="font-medium mb-2 line-clamp-2 h-12">E2E系列接近开关 直流三线NPN常开 感应传感器</h3>
          
          <div class="flex items-center text-sm text-neutral-500 mb-3">
            <i class="fa fa-warehouse mr-1"></i>
            <span>苏州仓 | 库存 <span class="font-medium text-success">256</span> 件</span>
          </div>
          
          <div class="flex items-center justify-between">
            <div>
              <p class="text-primary font-bold text-lg">¥128.00</p>
              <p class="text-xs text-neutral-500 line-through">¥150.00</p>
            </div>
            
            <button class="btn-primary text-sm px-3 py-1.5">
              <i class="fa fa-shopping-cart mr-1"></i> 加入购物车
            </button>
          </div>
        </div>
      </a>
      
      <!-- 商品5 -->
      <a href="product-detail.html" class="product-card block">
        <div class="relative">
          <img src="https://picsum.photos/400/300?random=5" alt="交流接触器" class="w-full h-48 object-cover">
          <span class="absolute top-3 left-3 bg-danger text-white text-xs px-2 py-1 rounded">4-7天达</span>
          <button class="absolute top-3 right-3 w-8 h-8 bg-white/80 backdrop-blur-sm rounded-full flex items-center justify-center text-neutral-600 hover:text-primary transition-colors">
            <i class="fa fa-heart-o"></i>
          </button>
        </div>
        
        <div class="p-4">
          <div class="flex items-center text-xs text-neutral-500 mb-2">
            <span class="bg-neutral-100 px-2 py-0.5 rounded mr-2">电气设备</span>
            <span>ABB</span>
          </div>
          
          <h3 class="font-medium mb-2 line-clamp-2 h-12">AX系列交流接触器 25A 220V线圈 3P 常开触点</h3>
          
          <div class="flex items-center text-sm text-neutral-500 mb-3">
            <i class="fa fa-warehouse mr-1"></i>
            <span>天津仓 | 库存 <span class="font-medium text-warning">8</span> 件</span>
          </div>
          
          <div class="flex items-center justify-between">
            <div>
              <p class="text-primary font-bold text-lg">¥345.00</p>
              <p class="text-xs text-neutral-500 line-through">¥380.00</p>
            </div>
            
            <button class="btn-primary text-sm px-3 py-1.5">
              <i class="fa fa-shopping-cart mr-1"></i> 加入购物车
            </button>
          </div>
        </div>
      </a>
      
      <!-- 商品6 -->
      <a href="product-detail.html" class="product-card block">
        <div class="relative">
          <img src="https://picsum.photos/400/300?random=6" alt="伺服电机" class="w-full h-48 object-cover">
          <span class="absolute top-3 left-3 bg-warning text-white text-xs px-2 py-1 rounded">2-3天达</span>
          <button class="absolute top-3 right-3 w-8 h-8 bg-white/80 backdrop-blur-sm rounded-full flex items-center justify-center text-neutral-600 hover:text-primary transition-colors">
            <i class="fa fa-heart-o"></i>
          </button>
        </div>
        
        <div class="p-4">
          <div class="flex items-center text-xs text-neutral-500 mb-2">
            <span class="bg-neutral-100 px-2 py-0.5 rounded mr-2">工业自动化</span>
            <span>三菱</span>
          </div>
          
          <h3 class="font-medium mb-2 line-clamp-2 h-12">MR-JE系列伺服电机套装 1.5KW 带编码器 三相220V</h3>
          
          <div class="flex items-center text-sm text-neutral-500 mb-3">
            <i class="fa fa-warehouse mr-1"></i>
            <span>上海仓 | 库存 <span class="font-medium text-success">36</span> 件</span>
          </div>
          
          <div class="flex items-center justify-between">
            <div>
              <p class="text-primary font-bold text-lg">¥4,580.00</p>
              <p class="text-xs text-neutral-500 line-through">¥4,980.00</p>
            </div>
            
            <button class="btn-primary text-sm px-3 py-1.5">
              <i class="fa fa-shopping-cart mr-1"></i> 加入购物车
            </button>
          </div>
        </div>
      </a>
      
      <!-- 商品7 -->
      <a href="product-detail.html" class="product-card block">
        <div class="relative">
          <img src="https://picsum.photos/400/300?random=7" alt="红外测温仪" class="w-full h-48 object-cover">
          <span class="absolute top-3 left-3 bg-success text-white text-xs px-2 py-1 rounded">次日达</span>
          <button class="absolute top-3 right-3 w-8 h-8 bg-white/80 backdrop-blur-sm rounded-full flex items-center justify-center text-neutral-600 hover:text-primary transition-colors">
            <i class="fa fa-heart-o"></i>
          </button>
        </div>
        
        <div class="p-4">
          <div class="flex items-center text-xs text-neutral-500 mb-2">
            <span class="bg-neutral-100 px-2 py-0.5 rounded mr-2">仪器仪表</span>
            <span>优利德</span>
          </div>
          
          <h3 class="font-medium mb-2 line-clamp-2 h-12">UT300S系列红外测温仪 工业级高精度 非接触式</h3>
          
          <div class="flex items-center text-sm text-neutral-500 mb-3">
            <i class="fa fa-warehouse mr-1"></i>
            <span>深圳仓 | 库存 <span class="font-medium text-success">106</span> 件</span>
          </div>
          
          <div class="flex items-center justify-between">
            <div>
              <p class="text-primary font-bold text-lg">¥289.00</p>
              <p class="text-xs text-neutral-500 line-through">¥329.00</p>
            </div>
            
            <button class="btn-primary text-sm px-3 py-1.5">
              <i class="fa fa-shopping-cart mr-1"></i> 加入购物车
            </button>
          </div>
        </div>
      </a>
      
      <!-- 商品8 -->
      <a href="product-detail.html" class="product-card block">
        <div class="relative">
          <img src="https://picsum.photos/400/300?random=8" alt="应急照明灯" class="w-full h-48 object-cover">
          <span class="absolute top-3 left-3 bg-danger text-white text-xs px-2 py-1 rounded">4-7天达</span>
          <button class="absolute top-3 right-3 w-8 h-8 bg-white/80 backdrop-blur-sm rounded-full flex items-center justify-center text-neutral-600 hover:text-primary transition-colors">
            <i class="fa fa-heart-o"></i>
          </button>
        </div>
        
        <div class="p-4">
          <div class="flex items-center text-xs text-neutral-500 mb-2">
            <span class="bg-neutral-100 px-2 py-0.5 rounded mr-2">照明设备</span>
            <span>正泰</span>
          </div>
          
          <h3 class="font-medium mb-2 line-clamp-2 h-12">消防应急照明灯 LED双头应急灯 安全出口指示灯</h3>
          
          <div class="flex items-center text-sm text-neutral-500 mb-3">
            <i class="fa fa-warehouse mr-1"></i>
            <span>杭州仓 | 库存 <span class="font-medium text-success">520</span> 件</span>
          </div>
          
          <div class="flex items-center justify-between">
            <div>
              <p class="text-primary font-bold text-lg">¥59.00</p>
              <p class="text-xs text-neutral-500 line-through">¥79.00</p>
            </div>
            
            <button class="btn-primary text-sm px-3 py-1.5">
              <i class="fa fa-shopping-cart mr-1"></i> 加入购物车
            </button>
          </div>
        </div>
      </a>
    </div>
    
    <!-- 分页 -->
    <div class="flex justify-center items-center gap-2 py-4">
      <button class="w-10 h-10 flex items-center justify-center rounded-lg border border-neutral-200 text-neutral-500 hover:border-primary hover:text-primary transition-colors disabled:opacity-50 disabled:cursor-not-allowed" disabled>
        <i class="fa fa-angle-left"></i>
      </button>
      
      <button class="w-10 h-10 flex items-center justify-center rounded-lg bg-primary text-white">1</button>
      <button class="w-10 h-10 flex items-center justify-center rounded-lg border border-neutral-200 hover:border-primary hover:text-primary transition-colors">2</button>
      <button class="w-10 h-10 flex items-center justify-center rounded-lg border border-neutral-200 hover:border-primary hover:text-primary transition-colors">3</button>
      <button class="w-10 h-10 flex items-center justify-center rounded-lg border border-neutral-200 hover:border-primary hover:text-primary transition-colors">4</button>
      <button class="w-10 h-10 flex items-center justify-center rounded-lg border border-neutral-200 hover:border-primary hover:text-primary transition-colors">5</button>
      
      <span class="text-neutral-500">...</span>
      
      <button class="w-10 h-10 flex items-center justify-center rounded-lg border border-neutral-200 hover:border-primary hover:text-primary transition-colors">25</button>
      
      <button class="w-10 h-10 flex items-center justify-center rounded-lg border border-neutral-200 text-neutral-500 hover:border-primary hover:text-primary transition-colors">
        <i class="fa fa-angle-right"></i>
      </button>
    </div>
  </div>
  
  <script>
    // 筛选标签切换
    document.querySelectorAll('.filter-tag').forEach(tag => {
      tag.addEventListener('click', function() {
        // 获取同组标签（同一父级下的所有filter-tag）
        const siblings = this.parentElement.querySelectorAll('.filter-tag');
        
        // 移除同组所有标签的active类
        siblings.forEach(sib => sib.classList.remove('active'));
        
        // 为当前点击的标签添加active类
        this.classList.add('active');
        
        // 这里可以添加筛选逻辑
        console.log('筛选条件变更为:', this.textContent.trim());
      });
    });
    
    // 加入购物车按钮交互
    document.querySelectorAll('.btn-primary:has(.fa-shopping-cart)').forEach(btn => {
      btn.addEventListener('click', function() {
        // 更改按钮状态
        const originalText = this.innerHTML;
        this.innerHTML = '<i class="fa fa-check mr-1"></i> 已加入';
        this.classList.add('bg-success');
        this.classList.remove('bg-primary', 'hover:bg-primary/90');
        
        // 2秒后恢复原始状态
        setTimeout(() => {
          this.innerHTML = originalText;
          this.classList.remove('bg-success');
          this.classList.add('bg-primary', 'hover:bg-primary/90');
        }, 2000);
      });
    });
  </script>
</body>
</html>